#!/bin/bash

set -e          # exit on error
set -o pipefail # exit on pipeline error
set -u          # treat unset variable as error

. /minioslib || exit 1

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"

LNG="$(echo $LOCALE | cut -d_ -f1)"

pkg update

if [ "$LOCALE" = "pt_BR" ]; then
    LNG="br"
fi

echo "export QT_QPA_PLATFORMTHEME=gtk2" >>/etc/environment

if [ "$LOCALE" != "en_US" ]; then
    cat <<EOF >/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml
<?xml version="1.0" encoding="UTF-8"?>

<channel name="keyboard-layout" version="1.0">
  <property name="Default" type="empty">
    <property name="XkbDisable" type="bool" value="false"/>
    <property name="XkbLayout" type="string" value="us,$LAYOUTID"/>
    <property name="XkbVariant" type="string" value=","/>
    <property name="XkbOptions" type="empty">
      <property name="Group" type="string" value="grp:alt_shift_toggle"/>
    </property>
  </property>
</channel>

EOF
    if [ "$DISTRIBUTION_TYPE" = "ubuntu" ]; then
        pkg install language-pack-gnome-$LNG-base
    fi
fi

echo "nodm nodm/enabled boolean true" | debconf-set-selections
echo "samba-common samba-common/dhcp boolean false" | debconf-set-selections

if [ -f /usr/share/applications/yad-icon-browser.desktop ]; then
    rm -f /usr/share/applications/yad-icon-browser.desktop
fi

if [ "$DISTRIBUTION" = "bionic" ]; then
    rm /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml
fi

# install packages
if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then
    case "$DISTRIBUTION" in
    jammy | noble)
        install_packages --replace-packages "policykit-1:policykit-1-gnome"
        ;;
    *)
        install_packages
        ;;
    esac
    #if [ $PACKAGE_VARIANT != "minimum" ] && [ $PACKAGE_VARIANT != "novice" ]; then
    #  case "$DISTRIBUTION" in
    #  bookworm)
    #    pkg -t bookworm-backports install pipewire-audio pipewire-module-xrdp
    #    ;;
    #  jammy | noble | trixie | sid)
    #    pkg install pipewire-audio pipewire-module-xrdp
    #    ;;
    #  esac
    #fi
fi

#for SIZE in 16 24 32 48 64 96 128 symbolic; do
#    cd /usr/share/icons/elementary-xfce/mimes/$SIZE
#    if [ -f office-database.png ]; then
#        ln -s office-database.png application-x-sb.png
#    fi
#done
#ln -s mimes /usr/share/icons/elementary-xfce/mimetypes
#update-mime-database /usr/share/mime
if [ -f /etc/skel/.config/Thunar/uca.$LNG.xml ]; then
    cp /etc/skel/.config/Thunar/uca.$LNG.xml /etc/skel/.config/Thunar/uca.xml
fi

if [ -f /usr/bin/connman-gtk ]; then
    if [ ! -d /etc/skel/.config/autostart ]; then
        mkdir -p /etc/skel/.config/autostart
    fi
    cat <<EOF >/etc/skel/.config/autostart/connman-tray.desktop
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=connman-tray
Comment=
Exec=connman-tray
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false

EOF
    pkg install dconf-cli
    cat <<EOF >/usr/bin/connman-tray
#!/bin/bash

if [ "$(dconf read /net/connman/gtk/launch-to-tray)" != "true" ]; then
    dconf write /net/connman/gtk/launch-to-tray true
fi
if [ "$(dconf read /net/connman/gtk/status-icon-enabled)" != "true" ]; then
    dconf write /net/connman/gtk/status-icon-enabled true
fi
connman-gtk

EOF
    chmod +x /usr/bin/connman-tray
    rm /usr/share/applications/connman-gtk.desktop
fi

if grep -q slim $SCRIPT_DIR/$PACKAGE_VARIANT.list && ! grep -q "#slim" $SCRIPT_DIR/$PACKAGE_VARIANT.list; then
    sed -i 's,xserver_arguments   -nolisten tcp,xserver_arguments   -nolisten tcp vt07,g' /etc/slim.conf
    sed -i 's,# hidecursor          false,hidecursor            false,g' /etc/slim.conf
    sed -i 's,screenshot_cmd      scrot /root/slim.png,# screenshot_cmd      scrot /root/slim.png,g' /etc/slim.conf
    sed -i 's,#auto_login          no,auto_login          yes,g' /etc/slim.conf
    sed -i 's,current_theme       debian-softwaves,current_theme       minios,g' /etc/slim.conf
    sed -i "s/#default_user        simone/default_user        $USER_NAME/g" /etc/slim.conf
fi

if grep -q nodm $SCRIPT_DIR/$PACKAGE_VARIANT.list && ! grep -q "#nodm" $SCRIPT_DIR/$PACKAGE_VARIANT.list; then
    cat <<EOF >/etc/default/nodm
# nodm configuration

# Set NODM_ENABLED to something different than 'false' to enable nodm
NODM_ENABLED=true

# User to autologin for
NODM_USER=live

# First vt to try when looking for free VTs
NODM_FIRST_VT=7

# X session
NODM_XSESSION=/etc/X11/Xsession

# Options for nodm itself
NODM_OPTIONS=

# Options for the X server.
#
# Format: [/usr/bin/<Xserver>] [:<disp>] <Xserver-options>
#
# The Xserver executable and the display name can be omitted, but should
# be placed in front, if nodm's defaults shall be overridden.
NODM_X_OPTIONS='-nolisten tcp'

# If an X session will run for less than this time in seconds, nodm will wait an
# increasing bit of time before restarting the session.
NODM_MIN_SESSION_TIME=60

# Timeout (in seconds) to wait for X to be ready to accept connections. If X is
# not ready before this timeout, it is killed and restarted.
NODM_X_TIMEOUT=300

EOF
fi

sed -i 's,<property name="FontName" type="empty"/>,<property name="FontName" type="string" value="Inter 10"/>,g' /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
sed -i 's,<property name="MonospaceFontName" type="empty"/>,<property name="MonospaceFontName" type="string" value="JetBrains Mono 10"/>,g' /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
sed -i 's,<property name="Antialias" type="empty"/>,<property name="Antialias" type="int" value="1"/>,g' /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
sed -i 's,<property name="HintStyle" type="string" value="hintmedium"/>,<property name="HintStyle" type="string" value="hintfull"/>,g' /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
sed -i 's,Sans Bold 10,Inter Bold 10,g' /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml

if grep -q xfce4-terminal $SCRIPT_DIR/$PACKAGE_VARIANT.list; then
    update-alternatives --set x-terminal-emulator /usr/bin/xfce4-terminal.wrapper
fi
if [ -f /usr/share/applications/pavucontrol.desktop ]; then
    rm -f /usr/share/applications/pavucontrol.desktop
fi

if [ -f /usr/share/applications/nm-connection-editor.desktop ]; then
    if ! grep -q "Name\[ru\]" /usr/share/applications/nm-connection-editor.desktop; then
        sed -i "7i Name\[ru\]=Расширенная конфигурация сети" /usr/share/applications/nm-connection-editor.desktop
    fi
fi

if grep -q xfce4-whiskermenu-plugin $SCRIPT_DIR/$PACKAGE_VARIANT.list; then
    if [ $DISTRIBUTION_PHASE = "legacy" ]; then
        echo "favorites=exo-terminal-emulator.desktop,exo-file-manager.desktop,exo-mail-reader.desktop,exo-web-browser.desktop" >/etc/skel/.config/xfce4/panel/whiskermenu-1.rc
    else
        echo "favorites=xfce4-terminal-emulator.desktop,xfce4-file-manager.desktop,xfce4-web-browser.desktop,xfce4-mail-reader.desktop" >/etc/skel/.config/xfce4/panel/whiskermenu-1.rc
    fi
    cat <<EOF >>/etc/skel/.config/xfce4/panel/whiskermenu-1.rc
recent=
button-icon=/usr/share/pixmaps/MiniOS-white.svg
button-single-row=false
show-button-title=false
show-button-icon=true
launcher-show-name=true
launcher-show-description=false
launcher-show-tooltip=true
item-icon-size=2
hover-switch-category=false
category-show-name=true
category-icon-size=1
load-hierarchy=false
view-as-icons=false
default-category=0
recent-items-max=10
favorites-in-recent=true
position-search-alternate=true
position-commands-alternate=false
position-categories-alternate=true
stay-on-focus-out=false
confirm-session-command=true
menu-width=450
menu-height=500
menu-opacity=100
command-settings=xfce4-settings-manager
show-command-settings=false
command-lockscreen=xflock4
show-command-lockscreen=false
command-switchuser=dm-tool switch-to-greeter
show-command-switchuser=false
command-logoutuser=xfce4-session-logout --logout --fast
show-command-logoutuser=false
command-restart=xfce4-session-logout --reboot --fast
show-command-restart=false
command-shutdown=xfce4-session-logout --halt --fast
show-command-shutdown=false
command-suspend=xfce4-session-logout --suspend
show-command-suspend=false
command-hibernate=xfce4-session-logout --hibernate
show-command-hibernate=false
command-logout=xfce4-session-logout
show-command-logout=true
command-menueditor=menulibre
show-command-menueditor=true
command-profile=mugshot
show-command-profile=false
search-actions=5

[action0]
name=Man Pages
pattern=#
command=exo-open --launch TerminalEmulator man %s
regex=false

[action1]
name=Web Search
pattern=?
command=exo-open --launch WebBrowser https://duckduckgo.com/?q=%u
regex=false

[action2]
name=Wikipedia
pattern=!w
command=exo-open --launch WebBrowser https://en.wikipedia.org/wiki/%u
regex=false

[action3]
name=Run in Terminal
pattern=!
command=exo-open --launch TerminalEmulator %s
regex=false

[action4]
name=Open URI
pattern=^(file|http|https):\\/\\/(.*)$
command=exo-open \\0
regex=true


EOF
else
    cat <<EOF >/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-panel" version="1.0">
  <property name="configver" type="int" value="2"/>
  <property name="panels" type="array">
    <value type="int" value="1"/>
    <property name="panel-1" type="empty">
      <property name="position" type="string" value="p=8;x=512;y=752"/>
      <property name="length" type="uint" value="100"/>
      <property name="position-locked" type="bool" value="true"/>
      <property name="size" type="uint" value="34"/>
      <property name="background-alpha" type="uint" value="90"/>
      <property name="mode" type="uint" value="0"/>
      <property name="enter-opacity" type="uint" value="100"/>
      <property name="leave-opacity" type="uint" value="100"/>
      <property name="plugin-ids" type="array">
        <value type="int" value="1"/>
        <value type="int" value="2"/>
        <value type="int" value="3"/>
        <value type="int" value="4"/>
        <value type="int" value="5"/>
        <value type="int" value="6"/>
        <value type="int" value="7"/>
        <value type="int" value="8"/>
        <value type="int" value="9"/>
        <value type="int" value="10"/>
        <value type="int" value="12"/>
        <value type="int" value="13"/>
        <value type="int" value="14"/>
      </property>
    </property>
    <property name="dark-mode" type="bool" value="true"/>
  </property>
  <property name="plugins" type="empty">
    <property name="plugin-1" type="string" value="applicationsmenu">
      <property name="button-icon" type="string" value="/usr/share/pixmaps/MiniOS-white.svg"/>
      <property name="show-button-title" type="bool" value="false"/>
    </property>
    <property name="plugin-2" type="string" value="separator">
      <property name="style" type="uint" value="0"/>
    </property>
    <property name="plugin-3" type="string" value="launcher">
      <property name="items" type="array">
        <value type="string" value="TerminalEmulator.desktop"/>
      </property>
    </property>
    <property name="plugin-4" type="string" value="launcher">
      <property name="items" type="array">
        <value type="string" value="FileManager.desktop"/>
      </property>
    </property>
    <property name="plugin-5" type="string" value="launcher">
      <property name="items" type="array">
        <value type="string" value="WebBrowser.desktop"/>
      </property>
    </property>
    <property name="plugin-6" type="string" value="separator">
      <property name="style" type="uint" value="0"/>
    </property>
    <property name="plugin-7" type="string" value="tasklist">
      <property name="show-handle" type="bool" value="false"/>
      <property name="flat-buttons" type="bool" value="true"/>
      <property name="show-labels" type="bool" value="true"/>
      <property name="grouping" type="uint" value="1"/>
    </property>
    <property name="plugin-8" type="string" value="separator">
      <property name="style" type="uint" value="0"/>
      <property name="expand" type="bool" value="true"/>
    </property>
    <property name="plugin-9" type="string" value="xkb">
      <property name="display-type" type="uint" value="2"/>
      <property name="display-name" type="uint" value="0"/>
      <property name="group-policy" type="uint" value="0"/>
    </property>
    <property name="plugin-10" type="string" value="battery"/>
    <property name="plugin-12" type="string" value="systray">
      <property name="known-legacy-items" type="array">
        <value type="string" value="task manager"/>
        <value type="string" value="volumeicon"/>
        <value type="string" value="networkmanager applet"/>
      </property>
    </property>
    <property name="plugin-13" type="string" value="clock">
      <property name="digital-format" type="string" value="%_H:%M"/>
    </property>
    <property name="plugin-14" type="string" value="showdesktop"/>
  </property>
</channel>

EOF
fi

if grep -q xfce4-power-manager-plugins $SCRIPT_DIR/$PACKAGE_VARIANT.list; then
    sed -i "s/battery/power-manager-plugin/g" /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
fi

if [ $PACKAGE_VARIANT = "minimum" ]; then
    cat <<EOF >/etc/skel/.config/xfce4/helpers.rc
TerminalEmulator=xterm
FileManager=Thunar
WebBrowser=

EOF
elif [ $PACKAGE_VARIANT = "standard" ] || [ $PACKAGE_VARIANT = "toolbox" ] || [ $PACKAGE_VARIANT = "ultra" ] || [ $PACKAGE_VARIANT = "puzzle" ]; then
    cat <<EOF >/etc/skel/.config/xfce4/helpers.rc
TerminalEmulator=xterm
FileManager=Thunar
WebBrowser=

EOF
fi

if [ $DISTRIBUTION_TYPE = "debian" ] && [[ $DESKTOP_ENVIRONMENT == *"xfce"* ]]; then
    if [ $DISTRIBUTION_PHASE = "legacy" ]; then
        sed -i "s/exo-open/env XDG_CURRENT_DESKTOP=XFCE exo-open/g" /usr/share/applications/exo-web-browser.desktop
    else
        sed -i "s/exo-open/env XDG_CURRENT_DESKTOP=XFCE exo-open/g" /usr/share/applications/xfce4-web-browser.desktop
    fi
    sed -i "s/exo-open/env XDG_CURRENT_DESKTOP=XFCE exo-open/g" /etc/skel/.config/xfce4/panel/launcher-5/WebBrowser.desktop
fi

rm -f /usr/share/backgrounds/xfce/*
rm -f /usr/share/backgrounds/greybird.svg
rm -f /usr/share/wallpapers/*
if [ ! -d /usr/share/backgrounds/xfce ]; then
    mkdir -p /usr/share/backgrounds/xfce
fi

for BACKGROUND in /usr/share/backgrounds/MiniOS*; do
    ln -s ../$(basename $BACKGROUND) /usr/share/backgrounds/xfce/$(basename $BACKGROUND)
done

set_wallpaper() {
    local WALLPAPER=$1
    ln -s ../MiniOS4-wallpaper-$WALLPAPER.svg /usr/share/backgrounds/xfce/xfce-verticals.png
    ln -s ../MiniOS4-wallpaper-$WALLPAPER.svg /usr/share/backgrounds/xfce/xfce-teal.jpg
    ln -s ../MiniOS4-wallpaper-$WALLPAPER.svg /usr/share/backgrounds/xfce/xfce-shapes.svg
}

if [ "$PACKAGE_VARIANT" = "minimum" ] && [ "$DESKTOP_ENVIRONMENT" = "flux" ]; then
    set_wallpaper "Flux"
elif [ "$PACKAGE_VARIANT" = "minimum" ] || [ "$PACKAGE_VARIANT" = "novice" ]; then
    set_wallpaper "jungle"
elif [ "$PACKAGE_VARIANT" = "standard" ]; then
    set_wallpaper "Standard"
elif [ "$PACKAGE_VARIANT" = "toolbox" ]; then
    set_wallpaper "Toolbox"
elif [ "$PACKAGE_VARIANT" = "puzzle" ]; then
    set_wallpaper "Puzzle"
elif [ "$PACKAGE_VARIANT" = "ultra" ]; then
    set_wallpaper "Ultra"
    sed -i "s/Greybird/Greybird-dark/g" /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
    sed -i "s/Greybird/Greybird-dark/g" /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
else
    set_wallpaper "sea"
fi

if [ $PACKAGE_VARIANT = "minimum" ]; then
    cat <<EOF >>/usr/share/applications/taskmanager.desktop
[Desktop Entry]
Name=Task Manager
Name[ar]=مدير المهام
Name[ast]=Xestor de xeres
Name[be]=Кіраўнік задач
Name[bg]=Мениджър на задачи
Name[ca]=Gestor de tasques
Name[cs]=Správce úloh
Name[da]=Opgavehåndtering
Name[de]=Taskmanager
Name[el]=Διαχειριστής εργασιών
Name[en_AU]=Task Manager
Name[en_GB]=Task Manager
Name[es]=Gestor de tareas
Name[eu]=Zeregin kudeatzailea
Name[fi]=Tehtävienhallinta
Name[fr]=Gestionnaire de tâches
Name[gl]=Xestor de tarefas
Name[he]=מנהל משימות
Name[hr]=Upravitelj zadacima
Name[hu]=Feladatkezelő
Name[id]=Manajer Tugas
Name[is]=Verkefnastjóri
Name[it]=Gestore dei processi
Name[ja]=タスクマネージャー
Name[kk]=Үрдістерді басқарушысы
Name[ko]=작업 관리자
Name[lt]=Užduočių tvarkytuvė
Name[ms]=Pengurus Tugas
Name[nb]=Oppgavebehandler
Name[nl]=Taakbeheerder
Name[oc]=Gestionari de prètzfaches
Name[pl]=Menedżer zadań
Name[pt]=Gestor de tarefas
Name[pt_BR]=Gerenciador de tarefas
Name[ru]=Диспетчер задач
Name[sk]=Správca úloh
Name[sl]=Upravljalnik nalog
Name[sq]=Përgjegjës Aktesh
Name[sr]=Управник задатака
Name[sv]=Aktivitetshanterare
Name[te]=కర్తవ్య నిర్వాహకం
Name[th]=โปรแกรมจัดการทาสก์
Name[tr]=Görev Yöneticisi
Name[ug]=ۋەزىپە باشقۇرغۇ
Name[uk]=Диспетчер задач
Name[vi]=Quản lý tác vụ
Name[zh_CN]=任务管理器
Name[zh_HK]=工作管理員
Name[zh_TW]=工作管理員
Comment=Easy to use task manager
Comment[ar]=من السهل إستخدام مدير المهام
Comment[ast]=Xestor de xeres cenciellu d'usar
Comment[be]=Зручны ў выкарыстанні кіраўнік задач
Comment[bg]=Лесен за използване мениджър на задачи
Comment[ca]=Gestor de tasques fàcil d'utilitzar
Comment[cs]=Snadno použitelný správce úloh
Comment[da]=Opgavehåndtering som er nem at bruge
Comment[de]=Prozessverwaltung mit einfacher Bedienung
Comment[el]=Εύκολος στην χρήση διαχειριστής διεργασιών
Comment[en_AU]=Easy to use task manager
Comment[en_GB]=Easy to use task manager
Comment[es]=Un gestor de tareas fácil de usar
Comment[eu]= Zeregin kudeatzaile erabilerraz bat da
Comment[fi]=Helppokäyttöinen tehtävienhallinta
Comment[fr]=Gestionnaire de tâches simple d’utilisation
Comment[gl]=Xestor de tarefas fácil de usar
Comment[he]=מנהל משימות קל לשימוש
Comment[hr]=Lagan za korištenje upravitelj zadacima
Comment[hu]=Egyszerűen használható feladatkezelő
Comment[id]=Manajer tugas yang mudah digunakan
Comment[is]=Einfaldur og auðveldur verkefnastjóri
Comment[it]=Gestore dei processi di semplice utilizzo
Comment[ja]=使いやすいタスクマネージャーです
Comment[kk]=Жүйе үрдістерін ыңғайлы басқару
Comment[ko]=쓰기 쉬운 작업관리자
Comment[lt]=Lengvai naudojama užduočių tvarkytuvė
Comment[ms]=Pengurus tugas yang mudah digunakan
Comment[nb]=Lett å bruke oppgavebehandler
Comment[nl]=Gemakkelijk te gebruiken taakbeheerder
Comment[oc]=De bon utilizar : lo gestionari de prètzfaches
Comment[pl]=Zarządza uruchomionymi procesami
Comment[pt]=Gestor de tarefas fácil de usar
Comment[pt_BR]=Um gerenciador de tarefas fácil de usar
Comment[ru]=Простой диспетчер задач
Comment[sk]=Správca úloh s jednoduchým používaním
Comment[sl]=Enostaven upravljalnik nalog
Comment[sq]=Përgjegjës aktesh i lehtë për t’u përdorur
Comment[sr]=Управник задатака лак за коришћење
Comment[sv]=Lättanvänd aktivitetshanterare
Comment[te]=వాడుటకు సరళమైన కర్తవ్య నిర్వాహకం
Comment[th]=โปรแกรมจัดการทาสก์สะดวกใช้
Comment[tr]=Kullanımı kolay görev yöneticisi
Comment[ug]=ئىشلىتىشكە ئەپلىك ۋەزىپە باشقۇرغۇ
Comment[uk]=Простий у використанні диспетчер задач
Comment[vi]=Trình quản lý tác vụ dễ dùng
Comment[zh_CN]=易用的任务管理器
Comment[zh_HK]=易用的工作管理員
Comment[zh_TW]=易於使用的工作管理員
GenericName=Task Manager
GenericName[ar]=مدير المهام
GenericName[ast]=Xestor de xeres
GenericName[be]=Кіраўнік задач
GenericName[bg]=Мениджър на задачи
GenericName[ca]=Gestor de tasques
GenericName[cs]=Správce úloh
GenericName[da]=Opgavehåndtering
GenericName[de]=Taskmanager
GenericName[el]=Διαχειριστής εργασιών
GenericName[en_AU]=Task Manager
GenericName[en_GB]=Task Manager
GenericName[es]=Gestor de tareas
GenericName[eu]=Zeregin kudeatzailea
GenericName[fi]=Tehtävienhallinta
GenericName[fr]=Gestionnaire de tâches
GenericName[gl]=Xestor de tarefas
GenericName[he]=מנהל משימות
GenericName[hr]=Upravitelj zadacima
GenericName[hu]=Feladatkezelő
GenericName[id]=Manajer Tugas
GenericName[is]=Verkefnastjóri
GenericName[it]=Gestore dei processi
GenericName[ja]=タスクマネージャー
GenericName[kk]=Үрдістерді басқарушысы
GenericName[ko]=작업 관리자
GenericName[lt]=Užduočių tvarkytuvė
GenericName[ms]=Pengurus Tugas
GenericName[nb]=Oppgavebehandler
GenericName[nl]=Taakbeheerder
GenericName[oc]=Gestionari de prètzfaches
GenericName[pl]=Menedżer zadań
GenericName[pt]=Gestor de tarefas
GenericName[pt_BR]=Gerenciador de tarefas
GenericName[ru]=Диспетчер задач
GenericName[sk]=Správca úloh
GenericName[sl]=Upravljalnik nalog
GenericName[sq]=Përgjegjës Aktesh
GenericName[sr]=Управник задатака
GenericName[sv]=Aktivitetshanterare
GenericName[te]=కర్తవ్య నిర్వాహకం
GenericName[th]=โปรแกรมจัดการทาสก์
GenericName[tr]=Görev Yöneticisi
GenericName[ug]=ۋەزىپە باشقۇرغۇ
GenericName[uk]=Диспетчер задач
GenericName[vi]=Quản lý tác vụ
GenericName[zh_CN]=任务管理器
GenericName[zh_HK]=工作管理員
GenericName[zh_TW]=工作管理員
Exec=xterm -e 'htop'
Icon=utilities-system-monitor
Terminal=false
StartupNotify=true
Type=Application
Categories=System;Utility;

EOF
fi
